package com.example;

import com.example.task.TimerTask;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = 
            new AnnotationConfigApplicationContext("com.example");
        

        TimerTask timerTask = context.getBean(TimerTask.class);
        

        System.out.println("======== 开始倒计时 ========");
        timerTask.startCountdown(60);
        

        context.registerShutdownHook();
    }
}